About 22098 letters

About 110 minutes

#Python's built-in modules

Python comes with many built-in modules, called standard library modules, which can be imported and used directly without additional installation.

Module NameDescriptionDetails
stringCommon string operationsView
reRegular expression operationsView
difflibHelpers for computing differencesView
textwrapText wrapping and fillingView
unicodedataUnicode databaseView
stringprepInternet string preparationView
readlineGNU readline interfaceView
rlcompleterCompletion function for GNU readlineView
structInterpret bytes as packed binary dataView
codecsCodec registry and base classesView
datetimeBasic date and time typesView
zoneinfoIANA time zone supportView
calendarGeneral calendar-related functionsView
collectionsContainer datatypesView
collections.abcAbstract base classes for containersView
heapqHeap queue algorithmsView
bisectArray bisection algorithmsView
arrayEfficient arrays of numeric valuesView
weakrefWeak referencesView
typesDynamic type creation and built-in type namesView
copyShallow and deep copy operationsView
pprintPretty-print dataView
reprlibAlternative repr() implementationView
enumSupport for enumerationsView
graphlibFunctions for graph-like structuresView
numbersNumeric abstract base classesView
mathMathematical functionsView
cmathMath functions for complex numbersView
decimalDecimal fixed and floating point arithmeticView
fractionsRational numbersView
randomGenerate pseudo-random numbersView
statisticsMathematical statistics functionsView
itertoolsIterator building blocksView
operatorFunctional interface to operatorsView
pathlibObject-oriented filesystem pathsView
os.pathCommon pathname manipulationsView
statInterpret results of stat()View
filecmpCompare files and directoriesView
tempfileGenerate temporary files and directoriesView
globUnix-style pathname pattern expansionView
fnmatchUnix filename pattern matchingView
linecacheRandom access to text linesView
shutilHigh-level file operationsView
pickleObject serializationView
copyregRegister pickle support functionsView
shelvePersistent storage of Python objectsView
marshalInternal object serializationView
dbmUnix "database" interfaceView
sqlite3SQLite DB-API 2.0 interfaceView
zlibGzip-compatible compressionView
gzipSupport for gzip filesView
bz2Support for bzip2 compressionView
lzmaCompression using the LZMA algorithmView
zipfileWork with ZIP archivesView
tarfileRead and write tar archivesView
csvCSV file reading and writingView
configparserConfiguration file parserView
tomllibParse TOML filesView
netrcNetrc file handlingView
plistlibParse and create Apple .plist filesView
hashlibSecure hashes and message digestsView
hmacKeyed-hash message authenticationView
secretsSecure random numbers for passwordsView
osMiscellaneous operating system interfacesView
ioCore tools for working with streamsView
timeTime access and conversionsView
loggingLogging facilityView
logging.configLogging configurationView
logging.handlersLogging handlersView
platformPlatform identification dataView
errnoStandard errno system symbolsView
ctypesForeign Function InterfaceView
argparseCommand-line option and argument parserView
optparseParser for command-line options (deprecated)View
getpassPortable password inputView
fileinputIterate over lines from multiple input streamsView
cursesTerminal handling for character-cell displaysView
curses.textpadText input widget for curses programsView
curses.asciiTools for ASCII character handlingView
curses.panelPanel extension for cursesView
threadingThread-based parallelismView
multiprocessingProcess-based parallelismView
multiprocessing.shared_memoryShared memory for multiprocessingView
concurrent.futuresLaunch parallel tasksView
subprocessSubprocess managementView
schedEvent schedulerView
queueSynchronized queue classesView
contextvarsContext variablesView
_threadLow-level threading APIView
asyncioAsynchronous I/OView
socketLow-level networking interfaceView
sslTLS/SSL wrapper for socket objectsView
selectWait for I/O completionView
selectorsHigh-level I/O multiplexingView
signalSet asynchronous event handlersView
mmapMemory-mapped file supportView
emailEmail and MIME handlingView
jsonJSON encoder and decoderView
mailboxManipulate various mailbox formatsView
mimetypesMap filenames to MIME typesView
base64Base16, Base32, Base64, Base85 encodingView
binasciiConvert binary data to/from ASCIIView
quopriEncode and decode MIME printable dataView
htmlHTML supportView
html.parserSimple HTML and XHTML parserView
html.entitiesDefinitions of HTML general entitiesView
xml.etree.ElementTreeElementTree XML APIView
xml.domDocument Object Model APIView
xml.dom.minidomMinimal DOM implementationView
xml.dom.pulldomSupport for building partial DOM treesView
xml.saxSAX2 parser supportView
xml.sax.handlerBase classes for SAX handlersView
xml.sax.saxutilsSAX utilitiesView
xml.sax.xmlreaderInterfaces for XML parsersView
xml.parsers.expatFast XML parsing using ExpatView
webbrowserConvenient Web browser controlView
wsgirefWSGI utilities and reference implementationView
urllibURL handling modulesView
urllib.requestExtensible library for opening URLsView
urllib.responseResponse class used by urllibView
urllib.parseURL parsingView
urllib.errorExceptions raised by urllib.requestView
urllib.robotparserrobots.txt parserView
httpHTTP modulesView
http.clientHTTP protocol clientView
ftplibFTP protocol clientView
poplibPOP3 protocol clientView
imaplibIMAP4 protocol clientView
smtplibSMTP protocol clientView
uuidUUID objects (RFC 4122)View
socketserverFramework for network serversView
http.serverHTTP serverView
http.cookiesHTTP state managementView
http.cookiejarHTTP cookie handling for clientsView
xmlrpcXMLRPC client and server modulesView
xmlrpc.clientXML-RPC client accessView
xmlrpc.serverBasic XML-RPC serverView
ipaddressIPv4/IPv6 manipulationView
waveRead and write WAV filesView
colorsysColor system conversionsView
gettextMultilingual internationalization servicesView
localeInternationalization servicesView
turtleTurtle graphicsView
cmdLine-oriented command interpretersView
shlexSimple lexical analysisView
tkinterPython interface to Tcl/TkView
tkinter.colorchooserColor chooser dialogView
tkinter.fontTkinter font wrapperView
tkinter.messageboxTkinter message dialogsView
tkinter.scrolledtextScrolling text widgetView
tkinter.dndDrag and drop supportView
tkinter.ttkThemed widgets for TkView
IDLEPython editor and shellView
typingType hints supportView
pydocDocumentation generator and online help systemView
doctestTest interactive Python examplesView
unittestUnit testing frameworkView
unittest.mockMock object libraryView
testPython regression test packageView
test.supportTest suite support toolsView
test.support.socket_helperSocket testing toolsView
test.support.script_helperTools for running Python scripts in testsView
test.support.bytecode_helperTools for testing bytecode generationView
test.support.threading_helperTools for thread testingView
test.support.os_helperOS testing toolsView
test.support.import_helperImport testing toolsView
test.support.warnings_helperWarning testing toolsView
bdbDebugger frameworkView
faulthandlerDump Python tracebacksView
pdbPython debuggerView
timeitMeasure execution time of small code snippetsView
traceTrace program executionView
tracemallocTrack memory allocationsView
ensurepipBootstrapping pip installerView
venvCreate virtual environmentsView
zipappManage executable Python ZIP archivesView
sysSystem-specific parameters and functionsView
sys.monitoringMonitor runtime eventsView
sysconfigAccess Python configuration informationView
builtinsBuilt-in objectsView
mainTop-level script environmentView
warningsWarning controlView
dataclassesData classesView
contextlibContext manager utilitiesView
abcAbstract base classesView
atexitExit handlersView
tracebackPrint or retrieve stack tracesView
futureFuture feature definitionsView
gcGarbage collector interfaceView
inspectInspect live objectsView
siteSite-specific configuration hookView
codeInterpreter base classesView
codeopCompile Python codeView
zipimportImport from ZIP archivesView
pkgutilPackage extension utilitiesView
modulefinderFind modules used by a scriptView
runpyLocate and run Python modulesView
importlibImplementation of importView
importlib.resourcesRead/open package resourcesView
importlib.resources.abcAbstract base classes for resourcesView
importlib.metadataAccess package metadataView
astAbstract Syntax TreesView
symtableAccess compiler symbol tablesView
tokenConstants for tokenizing source codeView
keywordCheck for Python keywordsView
tokenizeTokenizer for Python source codeView
tabnannyDetect ambiguous indentationView
pyclbrClass browser supportView
py_compileCompile Python source filesView
compileallByte-compile all Python librariesView
disDisassembler for Python bytecodeView
pickletoolsDeveloper tools for pickleView
msvcrtUseful routines from MS VC++ runtimeView
winregWindows registry accessView
winsoundSound playing interface for WindowsView
posixCommon POSIX system callsView
pwdPassword databaseView
grpGroup databaseView
termiosPOSIX-style tty controlView
ttyTerminal control functionsView
ptyPseudo-terminal utilitiesView
fcntlfcntl and ioctl system callsView
resourceResource usage informationView
syslogUnix syslog library routinesView

Created in 5/15/2025

Updated in 5/15/2025